package com.googlecode.monitoria.server.persistence.dao;

import java.io.Serializable;

import com.googlecode.monitoria.client.beans.Persistable;


/**
 * @author Ricardo Araujo Santos - ricardo@lsd.ufcg.edu.br
 *
 * @param <T> Any class implementing {@link Persistable} interface.
 */
public interface DAO <T extends Persistable> {

	/**
	 * @param id
	 * @return
	 */
	T findByID(Serializable id);

	/**
	 * @param object Object to delete.
	 */
	void delete(T object);

	/**
	 * @param object Object to update.
	 */
	void update(T object);

	/**
	 * @param object New object to persist.
	 */
	void save(T object);
}
